
//制作检测用户是否登陆的功能
$.ajax({
	url:"/employee/checkRootLogin",
	async:false,
	success:function(result){
		if(result.error && result.error == 400){
			location.href = "login.html"
		}
	}
})


$(function(){

	

	//制作公共的退出功能
	$(".login_out_bot").on("click",function(){
		$.ajax({
			url:"/employee/employeeLogout",
			success:function(result){
				if(result.success == true){
					location.href = "login.html";
				}else{
					alert(result.message);
				}
			}
		})
	})


	//展开左侧伸缩盒子
	var navLi = $('.navs li')

	navLi.on('click',function(){

		$(this).find('ul').slideToggle();

	});

});